//
//  VoiceBroadcastSettingsViewController.m
//  CoachsBook
//
//  Created by MaBookPro on 2022/8/25.
//

#import "VoiceBroadcastSettingsViewController.h"
#import "VoiceBroadcastSettingsView.h"
#import "AddVoiceViewController.h"

@interface VoiceBroadcastSettingsViewController ()
{
    VoiceBroadcastSettingsView *_VoiceBroadcastSettingsView;
}

@end

@implementation VoiceBroadcastSettingsViewController

- (void)viewDidLoad {
    [super viewDidLoad];

    self.view.backgroundColor = [UIColor whiteColor];
    //隐藏头部view
    self.navigationController.navigationBar.hidden = YES;
    NavigationHeadView *navgationheadv = [[NavigationHeadView alloc]initWithFrame:CGRectMake(0, 0, APPwidth, SafeAreaTopHight)];
    navgationheadv.titlelabel.text = @"语音播报设置";
    navgationheadv.titlelabel.textColor = [UIColor blackColor];
    navgationheadv.backbtn.hidden = NO;
    [navgationheadv.backbtn addTarget:self action:@selector(returnback) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:navgationheadv];
    navgationheadv.rightbtn.hidden = NO;
    [navgationheadv.rightbtn setTitle:@"添加语音" forState:0];
    [navgationheadv.rightbtn addTarget:self action:@selector(addBtnClick) forControlEvents:UIControlEventTouchUpInside];
    [navgationheadv.rightbtn setTitleColor:rgba(22, 120, 255, 1) forState:0];
    
    _VoiceBroadcastSettingsView = [[VoiceBroadcastSettingsView alloc]initWithFrame:CGRectMake(0, SafeAreaTopHight, APPwidth, APPheight)];
    [self.view addSubview:_VoiceBroadcastSettingsView];
}
-(void)addBtnClick{
    AddVoiceViewController *vc = [[AddVoiceViewController alloc]init];
    [self.navigationController pushViewController:vc animated:YES];
}
-(void)returnback{
    [self.navigationController popViewControllerAnimated:YES];
}
#pragma mark -视图即将出现
-(void)viewWillAppear:(BOOL)animated{
        
    ((TabbarController *)self.tabBarController).tabBarView.hidden = YES;
    
}


@end
